package com.lucweb.service.impl;

import com.lucweb.dao.WhyjtaskDao;

import com.lucweb.entity.TaskTz;
import com.lucweb.entity.TaskWhyj;

import com.lucweb.entity.TaskWhyjtz;
import com.lucweb.service.WhyjService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("whyjService")
public class WhyjServiceImpl implements WhyjService {
    @Resource
    private WhyjtaskDao whyjtaskDao;


    @Override
    public String newWhyjTask() {

        return this.whyjtaskDao.WhyjTaskNumber();
    }

    @Override
    public void saveOrUpdate(TaskWhyj taskWhyj) {


        whyjtaskDao.saveOrUpdate(taskWhyj);

    }

    @Override
    public int getMaxtzId() {


        return this.whyjtaskDao.getmaxId();

    }

    @Override
    public List<TaskTz> showTz() {


       return this.whyjtaskDao.showTz();

    }

    @Override
    public List<TaskWhyjtz> showTzList(String company) {


        return this.whyjtaskDao.showTzList(company);

    }

    @Override
    public List<String> showDtList(String company) {


        return this.whyjtaskDao.showDtList(company);

    }

    @Override
    public List<TaskWhyjtz> showTzFinish(String company) {


        return this.whyjtaskDao.showTzFinish(company);

    }


    @Override
    public void deleteTz(String para){

        whyjtaskDao.deleteTzDt(para);
    }


    @Override
    public void saveTz(TaskWhyjtz taskWhyjtz) {


        whyjtaskDao.saveTz(taskWhyjtz);

    }


    @Override
    public TaskWhyj getWhyjtaskById(int taskId) {
        return this.whyjtaskDao.getWhyjTaskById(taskId);
    }

    @Override
    public boolean deleteWhyjtask(int taskId) {
        whyjtaskDao.deleteWhyjtask(taskId);
        return true;
    }

    @Override
    public List<TaskWhyj> showTaskByName(String companyName){
        return this.whyjtaskDao.WhyjTask(companyName);
    }

}
